﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Lapv.Master" AutoEventWireup="true"
    CodeBehind="AccMN.aspx.cs" Inherits="Lapv.Account.AccMN" %>

<%@ Register Namespace="ASPnetControls" Assembly="ASPnetPagerV2_8" TagPrefix="cc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="header" runat="server">
    <%--menu tab  --%>
    <div class="tabnav">
        <ul>
            <li class="active"><a href="<%= domain%>Account/AccMN.aspx" class="list_t">D/S Tài khoản</a></li>
            <li><a href="<%= domain%>Account/AccAdd.aspx" class="add_t">Thêm Tài khoản</a></li>
            <li><a href="<%= domain%>Account/RoleAdd.aspx" class="list_t">Thêm role</a></li>
            <li><a href="<%= domain%>Account/PermissionAdd.aspx" class="add_t">Thêm Permission</a></li>
        </ul>
        <div class="clr">
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <%--form2 list - grid -table--%>
    <div class="form form2">
        <asp:DataGrid CssClass="table1" runat="server" ID="dtgrid" AutoGenerateColumns="false"
            OnItemCommand="Update_ItemCommand">
            <Columns>
                <asp:TemplateColumn HeaderText="Id" ItemStyle-Width="30">
                    <ItemTemplate>
                        <asp:Label runat="server" ID="lb_id" Text='<%# Eval("id") %>' />
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Tên đăng nhập" ItemStyle-Width="">
                    <ItemTemplate>
                        <%# Eval("UserName") %>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Ip đăng nhập" ItemStyle-Width="">
                    <ItemTemplate>
                        <%# getip((string)Eval("ipcanlogin"))%>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Role" ItemStyle-Width="">
                    <ItemTemplate>
                        <%# Eval("role.name")%>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Đặt IP" ItemStyle-Width="30">
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="lbt_edit" CommandName="EditIP" CommandArgument='<%# Eval("id") %>'
                            Text="Đặt"><img src="../styles/imgs/icon_sv.png" />  </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Sửa" ItemStyle-Width="30">
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="lbt_editip" CommandName="Edit" CommandArgument='<%# Eval("id") %>'
                            Text="Sửa"><img src="../styles/imgs/edit.gif " /></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="Xóa" ItemStyle-Width="30">
                    <ItemTemplate>
                        <asp:LinkButton runat="server" ID="lbtn_delete" CommandName="Delete" CommandArgument='<%# Eval("id") %>'
                            Text="Xóa"> <img src="../styles/imgs/delete.gif " /></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateColumn>
            </Columns>
        </asp:DataGrid>
    </div>
    <%--form1 add & edit--%>
    <div class="form pager">
        <div class="p_ddl">
            Number Record:
            <asp:DropDownList ID="ddlPaged" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlPaged_SelectedIndexChanged">
            </asp:DropDownList>
        </div>
        <div class="p_pager">
            <cc:PagerV2_8 ID="pager1" runat="server" OnCommand="pager_Command" GenerateGoToSection="true" />
        </div>
    </div>
</asp:Content>
